fixed javascript issues in admin panel