removed logging, fixed encoding error