fix for bug 541