Fixing overlapping legends