Fix tests. Unfinished.