clean up cert