Fixed issues with previous bt approach (hopefully).