fixes, end-to-end tests

@feiranwang  How come it worked before? Was it because the sampler was never called?