fix the problem overray is not closed