Fix bug in str_bs, where last piece was added twice