Fix bad matrix tests