fixed encoding, closes #1