Fixed gallery's collectionview bug