remove unnecessary init of $end_pos