adding removeSlash here as well to deal with frames with a leading slash