Fix npe
Fix panels