is now being updated correctly during state transition