Fixed that reset of values was too late