Added last-of-type selector to select the last element.