fixed bug where matrix updates not getting written to disk