Fixes bug that prevented showing the custom HTML legend in the share window