corrected matrix tests