change html generation to be stable