Fixed repeat bug and selected