fixes some bugs linked to functionals tests