Still some fixes to refine first and last values