Made changes to the call back in the JavaScript code