bugfixes in encodings module