bug 893: tied up commit and some minor fixes