[#12] Fix critical bug on changing number of views in gallery view