cleanup, duplicate and convert to curve only if not curve