Bug fix in admin.js