fix loading and saving charts in plugin