cleanup and remove inner mask