Fixed repeat bug