Moved privilege creation to end