Fix template.php breaking site if panels is not enabled.
Fix buttons for panels ipe.