Fix MainPanel losing focus
Merge branch 'master' into gui