Fixed a bug where paths with short names caused exceptions