Fix thor compatability regression between 0.16 and 0.18+.