#50: Try to close connections correctly