fixed repeats bug