Fixes in build_response_packet