bug fixes for path problems