Fix bug in integration test