Added curly brackets to else statement.