Fix BDS code.