fixed issues with js not loading correctly