update integration test for andy's update and fix a bug