Bug fixes for integration tests

Change-Id: Icc789dfb9ddec54c0401a8b84f400d7ce1e957e1