Memory leak work around for perl, should play better with events that call other events now.