bugfix in path manipulation.