fixed 404 problem caused by trailing slash