fixing cert removal functionality