small correction to load and write legende