Fix things broken by jQuery conversion

$(something) returns a jQuery object, not a regular HTML DOM one