fixes for Legend