Feature/permissions fixes