Removed unnessary 2D matrix value reassignment.