Fix a few problems with panel display