fix a bug that will cause fetal error