fix direct implementation and its tests, and other tests that interfered with each other