Bugfix/read binary data

fixes #533