fix the gallery view, add refresh button