Fixed a few issues with control.php