photoset optimize and bug fix