Fix bug where trailing slash gets stripped off base URI