correct bug in trainer