walkPath() lastPos wasn't assigned