Fix bug that caused assets not to load properly