adds protection around api calls and fixes flickr