fixed training bug