fixed repeat bug