fixed the lazy fetching problem for matrices