fix needUpdate condition bug