remove crypt before close