fix functional test