reapply changes from 6f907c3b

avoiding a merge commit or wrongly attributing this change to jobermayr