Fix: undefined index errors in monitor.php