fix empty galleries