fixed legend issue