fix bug which caused different results in integration test