fix bugs in dfu functional descriptor code