Fixed calculating the host with port