diff --git a/gtests/net/packetdrill/run_packet.c b/gtests/net/packetdrill/run_packet.c
index 1767528d18aa2c9865993c3859156af665264392..2aa404f1ba57176b3606b61877713f125fcd1b43 100644
--- a/gtests/net/packetdrill/run_packet.c
+++ b/gtests/net/packetdrill/run_packet.c
@@ -2409,14 +2409,8 @@ static int do_inbound_script_packet(
 				}
 				break;
 			case SCTP_COOKIE_ECHO_CHUNK_TYPE:
-				if (!(item->flags & FLAG_CHUNK_VALUE_NOCHECK)) break;	// if the cookie was explicitly 
-											// added to the test script, we dont
-											// need to copy the saved cookie
-											// from the init_ack chunk ...
-											// TODO: can this be done in a more readable way?
-											
-				
-				if (socket->state == SOCKET_PASSIVE_INIT_ACK_SENT) {
+				if ((socket->state == SOCKET_PASSIVE_INIT_ACK_SENT) &&
+				    (item->flags & FLAG_CHUNK_VALUE_NOCHECK)) {
 					temp_offset = socket->prepared_cookie_echo_length - item->length;
 					assert(packet->ip_bytes + temp_offset <= packet->buffer_bytes);
 					memmove((u8 *)item->chunk + item->length + temp_offset,