Fixed trailing slash incorrectly stripped.