Fixed a small error

Fixed a small error in the KSP linear solver when packing the J data into the dictionaries.