unfinished patch for bug 515584