Fixed misnaming map and added brackets to a switch statement.