fix the cell moving problem