Casting port to int in case it comes from CLI

Change-Id: Ic6d9bb60bea828d6826f7a0cd6477dcb39e9880a