Correction in decryption block
diff --git a/lib/decryption/a5_1_2.h b/lib/decryption/a5_1_2.h
index fb87498..75277df 100644
--- a/lib/decryption/a5_1_2.h
+++ b/lib/decryption/a5_1_2.h
@@ -364,13 +364,13 @@
   }
 }
 
-void runA51(unsigned char AtoBkeystream[]) {
+void runA51(byte AtoBkeystream[], byte BtoAkeystream[]) {
   int i;
 
   /* Zero out the output buffers. */
-  for (i = 0; i < 114; i++)
+  for (i = 0; i < 114; i++){
     AtoBkeystream[i] = 0;
-
+  }
 
   /* Generate 114 bits of keystream for the
    * A->B direction.  Store it, MSB first. */
@@ -378,6 +378,13 @@
     clock(0, 0);
     AtoBkeystream[i] = getbit();
   }
+  
+  /* Generate 114 bits of keystream for the
+   * B->A direction.  Store it, MSB first. */
+  for (i = 0; i < 114; i++) {
+    clock(0, 0);
+    BtoAkeystream[i] = getbit();
+  }
 }
 
 
diff --git a/lib/decryption/decryption_impl.cc b/lib/decryption/decryption_impl.cc
index 4347b62..60409c7 100644
--- a/lib/decryption/decryption_impl.cc
+++ b/lib/decryption/decryption_impl.cc
@@ -95,7 +95,7 @@
             uint32_t t3 = frame_number % 51;
             uint32_t frame_number_mod = (t1 << 11) + (t3 << 5) + t2;
             keysetup(&d_k_c[0], frame_number_mod);
-            run(AtoBkeystream, BtoAkeystream);
+            runA51(AtoBkeystream, BtoAkeystream);
             
             if(uplink_burst){
                 //process uplink burst
@@ -108,6 +108,7 @@
             for (int i = 0; i < 3; i++) {
                 decrypted_data[i] = burst_binary[i];
             }
+            //encrypt first part of the burst
             for (int i = 0; i < 57; i++) {
                 decrypted_data[i+3] = keystream[i] ^ burst_binary[i+3];
             }
@@ -115,6 +116,7 @@
             for (int i = 60; i < 88; i++) {
                 decrypted_data[i] = burst_binary[i];
             }
+            //encrypt second part of the burst
             for (int i = 0; i < 57; i++) {
                 decrypted_data[i+88] = keystream[i+57] ^ burst_binary[i+88];
             }