fixed bug with trailing /