Fixes #3020 [skip ci]