removing excess permissions