Fix legends with integer attributes.