fixed bug happening when site was loaded in a subfolder