Fixed test tp return matrix to device