fixed spin lock bug with multiple locks