Corrected discount factor
Fixed how to treat 0