Need to set up drag and resize on create. Also wrong variable name.

Side note, this code should be safe even if ui.draggable and ui.resizable aren't available.