Fix some crash bugs.
Merge branch 'master' of github.com:Arctem/nmt_python_labs