Fix indexing errors in finite difference

- the right bounds for the middle elements were off
- typo in 2nd last parameter to cs4