Making code more consistent

Stat update happens at the end in the other place