Fix syntax errors in set_app_privileges()