Fix broken admin function