Further improvements/fixes to lambda shape analysis