Fix tests

Merge since it's needed and small changes.