Fixed bug in admin to make code more portable.