made collections not crash in gallery view

Viewing a collection in gallery view was crashing. This fixes that.

PSU bug: https://scm.dlt.psu.edu/issues/9486