fix a bug when using seal