More tests

Add more tests and fix some corner case bugs for the sync / copas backends