fixing utf8 bug by sending entity as bytes instead of string entity