fix check for repeat/cycle