Close connection on reload