null error fix for firefox, opera, and ie