Removed one more rank issue and changed name of extendedpinv to pinv_extended