fixed bug with url optional end slashes