Fixed a few errors in tests