Fix functional unit tests