Fixed generic js in admin to work after DOM alterations