fixed BinThenReg bugs. BinThenReg officially workinggit status woohoo~ refactored.