cloase h2 properly