Fix for bug 1007582