fix bool logic