Fixed repeater function calling all the tasks at once