Saner casting
All encoding variants need proper attention