Fixed bug with wrong parsing of spinlock
Added 3 test cases