fixed problem with trailing slash