Fix for Bug 5806 with test