Bugs in JS
OnSave remains on current index