Fixed if-statement