fixed chat CSS on firefox and added some checks