fix port parser

And correctly verify rules on updates on API.