Fixes #6041