fixed crash in demo in api < 11