fixing a few bugs in baud search