Fixed bug in integration test