Fixed boolean check