Update frame and index