switching between panels working, but components not created