clean element set element to NULL when done