added workaround when hosting on the subdirectory of the server