Fixes for permissions