tentative fix for NoneType blockdir error in BDM.py