If, else if, else statement not behaving as expected

Printable View