Fix crash in demo mode