Update Panels.php

Multiple fixes.