Fix ghost cycles problem.