fixed bug with group permissions