Use distinct to avoid concurrency issue in spec