Added auto-closing

Hi! It's my first pull request, please be gentle with me... :-)
`nil` is a weird default for a boolean. `false`?