Fix boolean bug