solved the prblem caused by carefulless code copy and merge.