Fixed receive output message typecast uint8 to int
Changed global_t to local_t in add_blocks