fix cycle index setting in select_cycle()