fixed some problems related to HTML changes