fixed "if" statement