Fixing javascript problem in admin