Error in if statementw