fix matrix access macro