fixed ghost state calculation
added gradient assignment for ghost cells