more work for bug 584733. also did a patch for bug 957167