binary data corruption fix