Fixed a few bugs with firefox warning