Fixed bugs related to deleting and creating sites