Solved a legend bug