fix a bug of trainning