Added additional check to see if gallery exists

Resolves #8