Functional test bug fix