 $.fn.handleSmartListingControls = () ->
 	$(this).each () ->
 		controls = $(this)
-		smart_listing = $("##{controls.data('smart-list')}")
+		smart_listing = $("##{controls.data('smart-listing')}")
 
 		controls.submit ->
 			# Merges smart list params with the form action url before submitting.


$.fn.smart_listing = () ->
	map = $(this).map () ->
		if !$(this).data('smart-list')
			$(this).data('smart-list', new SmartListing($(this)))
		$(this).data('smart-list')
	if map.length == 1
		map[0]
	else

		@name = @container.attr('id')
		@loading = @container.find('.loading')
		@content = @container.find('.content')
		@status = $(".smart_listing_status[data-smart-listing='#{@name}']")
		@confirmed = null

		createPopover = (confirmation_elem, msg) =>
