fixed test_functional