Fixes #4986