Make port detection for /stats p more sane