fix loadFromState for panel.