Fix error reporting of port

Change-Id: I32374d92956ea2a361ceac04b11f7cceddea519f