Added correction to term function