fixed some bugs in e2e tests