bugfix: for proper handling of legend update