Fix bug with "no gallery items" message not showing up