Test-related fixes