Added check for no pictures in gallery