Fixed logic warning