fix bug about 1007