Fixed functional unit tests