Was using u_int8_t instead of uint8_t