Fix bugs for release 1.2

All tests passed, skipping S3 tests.