fix spinlock