Fixes a crash in the examples