Fix bug 2878