Fixed a critical bug. Commented out sorts on the matrix for now...