Fix UTF-8 bugs and time overwrite