Several fixes for BSE