fixing bugs with paths