fixes #4861