Fixing bug with tabs; Fixing bug with core iterate function