Fix all issues aroun functional tests