fix for Error on program close
Merge branch 'master' into PySide