Fix to Firefox and iOS7 Safari incompatibility