Fixed localStorage to no try and parse 'undefined'