Fixed if else in local_storage.