Fixed the if-else condition.