Fixes bug surfacing in Firefox.