Fix B/D in sender.c, fix frequency choosing