improve check for the existence of localStorage
if there's no active element, then use a particular element that can't be active