Fix another bug in levy calculation