Small fix on computation of pseudo-inverse