legend problem