Fixed a crash on creating legend