Fix bug in frame state.