Fixes Bug 827618

This fixes the bug mentioned here: https://bugzilla.mozilla.org/show_bug.cgi?id=827618