fixed the cell switching and focusing