fixed wrong mode cycling