Changed htons to ntohs