Changed the else-if statement