Fix copy-paste error for non-square matrices