fix for max chart when swapping charts