Check backtrace on migration - issue #540
Merge pull request #541 from skorth/master

Fix issue #538