Rename close handler (fixes #126)

This pull request renames the close handler, fixing issue #126