diff --git a/main.c b/main.c
index b8c114cc663fd305a8aeca2b22630641aa4a94bb..3c033d13194d9b70b837390664aea1b8668d1919 100644
--- a/main.c
+++ b/main.c
@@ -7,6 +7,7 @@
 
 #include "asf.h"
 #include <stdio.h>
+#include <math.h>
 #include <avr/io.h>
 #include <avr/interrupt.h>
 
@@ -16,7 +17,7 @@ uint16_t step_counter = 0;
 
 //Internal function declarations
 void single_step(void);
-void multi_step(bool dir, uint16_t steps, uint16_t steps_per_s)
+void multi_step(bool dir, uint16_t steps, uint16_t steps_per_s);
 
 void single_step(void){
     static bool last_dir = 1;
@@ -53,7 +54,7 @@ void multi_step(bool dir, uint16_t steps, uint16_t us_per_step){
     
     // stop timer
     
-    TIMSK1 &= ~(1 << OCIEA1);
+    TIMSK1 &= ~(1 << OCIE1A);
     TCCR1B &= ~(0b00000111);
 }