Set current state on startup.