fixed some changes that broke file loading when not hosted from the root url