fixed bug pi init in ips & improved dlam computation