Fix warnings, firefox bugs