Backend: Fix path functions, fixes #202