Removing extra / from function path