Removed else statement and fixed if statement.