Fixed an error into use of switch case.