Wrong condition in if