Fix for bug 1006223