A bugfix for #969