fix logical true return false bug