Fixes legend order