Use nth-of-type instead of nth-child when accessing element via an index. Other minor test fixes