Convert port to int value to fix freezing-on-start error