do not emit close before end. fixes #1
1.1.0