Changes to accomodate findings in bug 895389.
Returning 1 seems to be the same as returning True.
Merge pull request #187 from roydude/v1-train

v1train