Made sure that mid_frame is always even so it won't break on microcontrollers.