Fixed port init to allow strings as input