improve permissions handling
cosmetics