Fixed looping issues on refer to htc
Merge branch 'bart2' of github.com:BaobabHealthTrust/bart2 into bart2