Minor bug fixes for tests themselves