Fixed $MONITOR_PORT detection, thanks choffmann

Fixes issue #213