If statement is not working properly

Printable View