Improve test stability