separated legend from ending_label, fixes #141