fix boolean check