fixed bug of #162,#163