changed gallery picture behaviour