fixing bug in path parsing