Fixes #2720, first draft