fixing before script perms