A Bayesian adaptive design for clinical trials in rare diseases