Fix up the panel integration some more.
Hopefully fix a crash for badly written apps.