fix / update for broken gallery sorting
updating PR per @JustinSainton notes
Merge pull request #1426 from norcross/master

fix / update for broken gallery sorting