Fix bug 2931