fix boolean checks