fixed boolean detection