Fixed bug on 2.4.x servers when using aggregation cursor and close happens on server connection