Fix for despawnMaterial