fixed bug in integration test