fix boolean bug