Fix to support legacy urls (mainly ending in /)