Handle the trailing slash properly