fix BBD create code