bugfix in decode_binary