CalledFromWrongThreadException fixup, closes #337