bugfixes, move to thor