diff --git a/src/sender_utils.h b/src/sender_utils.h
index 17b11f80b1bfb1f937dc6e276a5cb576849d06cb..035aa0cefd56090cca7832d02991c5cb9aee2275 100644
--- a/src/sender_utils.h
+++ b/src/sender_utils.h
@@ -24,10 +24,12 @@
 #define OUT_OFF_WINDOW          255
 
 // It is used to identify what kind of pkt was sent lately
-#define RANDOM_PKT      0
-#define LAST_DATA_PKT   1
-#define CLOSING_PKT     2
-#define LAST_FEC        3
+typedef enum {
+	RANDOM_PKT    = 0,
+	LAST_DATA_PKT = 1,
+	CLOSING_PKT   = 2,
+	LAST_FEC      = 3
+} last_sended_pkt_t;
 
 
 /** 
@@ -42,9 +44,9 @@ typedef struct state {
     uint8_t tail;  // place oldest element insert in the buffer                | the start and end of the sender window (of the sended pkt)
     uint8_t next_seqnum;
     uint8_t map_seqnum_to_buffer_place[SEQNUM_RANGE]; // Default value is: OUT_OFF_WINDOW
-    uint8_t last_pkt_sent;  // Can either be: RANDOM_PKT, LAST_DATA_PKT, CLOSING_PKT or LAST_FEC
+    last_sended_pkt_t last_pkt_sent;  // Can either be: RANDOM_PKT, LAST_DATA_PKT, CLOSING_PKT or LAST_FEC
     pkt_t *FEC;      // The pkt FEC in construction
-    uint8_t FEC_nbr; // The number of PTYPE_DATA stacked on the FEC
+    uint8_t FEC_nbr; // The number of PTYPE_DATA stacked on FEC
 } sender_state_t;
 
 
diff --git a/tests/advanced_test.sh b/tests/advanced_test.sh
index 297f4975a7d70e7169204bf2d55e9e46bdbfa445..72fb0aa828fe219de5971da24fae29ef7f24f7ce 100755
--- a/tests/advanced_test.sh
+++ b/tests/advanced_test.sh
@@ -47,7 +47,7 @@ cleanup()
 trap cleanup SIGINT  # Kill the background procces in case of ^-C
 
 # We start the transfer
-if ! valgrind --leak-check=full --log-file=${TEST_OUTPUT_FILES}/adv_valgrind_${BSN_PRE}_receiver.log \
+if ! valgrind --leak-check=full --log-file=${TEST_OUTPUT_FILES}/adv_valgrind_${BSN_PRE}_sender.log \
     ./sender -f ${FILENAME} ::1 $port2 2> ${TEST_OUTPUT_FILES}/adv_${BSN_PRE}_sender.log ; then
   echo "Crash du sender!"
   cat ${TEST_OUTPUT_FILES}/adv_${BSN_PRE}_sender.log