Regular user cannot run sp_updatestats. Removed that from the RebuildGalleryIndexes SQL.