Updated mysql connection close