fix logical compiler