fix some htons instead of htonl
fix some list indirection issues