moved fix for permissions to right location