Fixes gallery import mechanism.
Merge pull request #874 from RotaruDan/galleryViewFix

Fixes gallery import mechanism.