Correct a if branch error