Fix legend unit formatting