Fix repeat bug