Fix issue with pathname