While case bug fixing in process