Fix classes async

The examples were raising uncaught exceptions (I think there is a bug/conflict between the Async main loop and some of Graphics' signal handling stuff). These fixes avoid this bug.