Fix functional test