patch for 4.0b Rated 5 out of 5 stars

https://bug18808.bugzilla.mozilla.org/attachment.cgi?id=476522