fixed compatibility with deployment under path prefix