Fixed the wrong if else statement