Wrong value in if