Finalized fixes to 26785.
Merge pull request #252 from roydude/v1-train

Finalized fixes to 26785.