fixed some bugs associated with moving js files