Use WeakRef to prevent crash on RM 2.5/2.6
Merge pull request #141 from bensie/master

Use WeakRef to prevent crash on RM 2.5/2.6