remove the end of /.