Fix unicode-decode error when syncing tasks.