fixed bug that some overlays are not deleted