Bugfix: handle possible EncodeException. Version 1.0.17