fix unicode-decode crash