Added the possiblity to fetch 2d array of reals from lua, also some minor fixes to 1d case.