Fixed issues found in integration testing