Do proper slicing based on the selector.