WIP bugfixes on bdp