Updated BB Detect script