set conn to null after closed