Fix bug getting path from URL
(a hack for now)