Fix findPort: correctly handle the empty ports case