Fix spec race condition