Fix some incompatibility with firefox