fixed boolean issues