Cast port to int