Fixes a crash in reactor.ReactorWorker.run()
Implements command.main()