fixed error in passing len of raw_data