Fix bugs introduced by lib directory creation and JS asset relocation