Remove setting material to NULL in destructors.