fixed pseudoinverse