fix package to work with separated js files and bug at update script