fixed boolean bug