Added end point correction