fixing export of binary data