Fix crash in sandbox