fix path handling