Bug in if