fixed hasRepeat bug