Bugfix, undefined 'trainData'