Fix path handling issue