fix functional tests