Fix reversed boolean check