fix bug with data len, strlen not useful for bits data