Fixed a few bugs in paths