in reply to Wierd error message
In general, you can avoid that kind of error message by not putting objects into global variables (or tieing globals, which is a sideways way of putting in an object), at least without manually clearing/untieing them at some point.