fix binary parsing