Add bugfix for #6420