fixes to path handling