fixed some bugs with paths