removed function call at end of javascript

this called the update function when it was not necessary