trailing slash error fixed