Fix encoding in frame