Correct the behaviour of the component with session storage.