nil out the delegate before going away. Fixes a crash.