removing unnecessary trailing slash