test fixes, tj please check out test_replicate