[WIP] Fixed functional tests