Fixed issue with incorrect URL when document root ends with slash