Fix Bug 943002

This pull fixes <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=943002">bug 943002</a>.  It also might fix <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=941919">bug 941919</a>.