add close_connection fix for 1.7c2

Fixes #35