fix several encoding issues and times as numbers