Made trailing slash optional for roots