fix binary reverse bug