Fixed unit-testing bug, and UTF-8 decoder bug