Fixed bug in unit test of AF.