Fixing html errors and updating xml