fixed a bug with duplicate trainings