Parse URI port correctly.