cleaning up db connection