Fix functional tests script