Fixing functional tests