fix double-inverse bug in lambda