Fixes #2731