Trying to fix the problems cause by marionette session ending bug.
Merge pull request #192 from roydude/v1-train

Trying to fix the problems cause by marionette session ending bug.