Fix mozilla compatibility issues