Fixed REPEAT bug