Fix handling port and server from commandline