Fix for bug 777527

Fix for bug #777527
https://bugzilla.mozilla.org/show_bug.cgi?id=777527