fix GC problem with registered delegates.  thanks to zgramana.