Fix for bug 1021041