added alerts and permission fixes