Fixed borkened if-then-else statement.