Bug fix in my bug fix in trainer