Fix functional test issues