fix logical