fix repeating bug