fixed up code for Flickr.js