Use last-of-type selector in addition to last-child.