Fix for first_and_last issue.