fixing dealing with paths