fix reading matrices in floating point