Correctly remove element on destroy