regression for bug 512