Fixed bug with empty encoding fixes #102