Fix for bug 3820 attempt 2