Made fixes based on the second set of integration tests.