Improve error message for missing order key
Fix unicode encode/decode errors