Switched the ntohs with htons and vice versa