Fixed issue #311 - problem with Thor being reference before it is loaded.