Fix crash in production