One more fix for ln calculation