Changed erroneous switch statement.