fix body null error in firefox and ie