Fixed minor error when accessing ghost cells.