Corrected condition that doesn't print nth-of-type