Fix for bug 1685