Added a spinlock