fixed bug in binary file parser