Fix tests

See commit logs