fixed a bug that was causing eleciton admin error page to crash the app.