Remove unused variable.
Fix raw bytes bug.
Add test.