Boolean bug fix