fixing boolean operator