Fix update code bug + fix add new code (multiplied by count of inserting)