Added automatic recognition of when a linear object is being collected.