Fixes #2766