fixed "and" in condition checks.