Rename close handler (fixes #126)