encoding, warnings fixes