somewhat risky change, but initial testing shows that panels are much better behaved
fix a few bugs