fix a bug cased by delete some code