Fixing a few bugs in tests.
Fixed up final errors.