Fixes state update.