Fixes #6002