remove unnecessary trailing slash