Fix functional tests