Fix typedef for first/last