fixed eva_costfun