Add missing while for the case statement.