fix bounds checking when e.g. t0 > 23 && t0 <= 23 are conditions