Bugfix to blob encoding