sooo, I know you didn't do this(existing code), but I think there's a leaked global on line 368.