bug 645 improved