repair stackPanel bug