fixed some bugs in paths