Correct for valuefunction