What are the final stages of ankylosing spondylitis?