fix end accuracy problem