Removed setting of context on every state change.