fix solution for 1.7--matrix was getting completely zeroed out