fixes to support directory hierarchies