fix lnp calculation