Fixes #5640