This PR actually fixes bugs 888438, 888431, 888422, 888417 and 888408

@lauraxt r?

Bugs Fixed by this PR
------------------------------

https://bugzilla.mozilla.org/show_bug.cgi?id=888438
https://bugzilla.mozilla.org/show_bug.cgi?id=888431
https://bugzilla.mozilla.org/show_bug.cgi?id=888422
https://bugzilla.mozilla.org/show_bug.cgi?id=888417
https://bugzilla.mozilla.org/show_bug.cgi?id=888408