Updated to add check for no pictures in gallery