US consumer sentiment rises in August after falling 4 months