Fixed race condition in at