Fixed some bugs
Should be a diagonal matrix
Fixed deep copy bug