Bug fix
Bug fixes to align with DBS2 implementation