boolean bug fix