fixes for bug867137 and other minor changes