issue #185: fix error when trying to close open events