fixes #6046

would have opened against master but the dev version got slightly changed.