fix random photo widget (partially - gallery3 needs fixing also)