fix next photo loading by exposing  var in module