Fixed wrong var compare bug.