more fixes for permissions