Add support for first/last #555