Don't crash when testing with Thor. Fixes #146