Trying to solve path bug