Merging in bugfix from informed_sampling branch