bug 847 improved