bug in updatePath