Changed return type of spinlock, it might crash if this wasn't here
Fixed lock bug