diff --git a/scripts/scheduleInput.js b/scripts/scheduleInput.js
--- a/scripts/scheduleInput.js
+++ b/scripts/scheduleInput.js
@@ -287,7 +287,10 @@ function add_sections(cnum, data)
 	function add_class_n(name)
 	{
 		sectionsOfClass[classNum] = 0; // Initialize at 0
-		jQuery('#jsrows').append('
 |  |  |  | 
');
+		jQuery('#jsrows').append(' |  |  |  | 
');
+
+		/* store classNum as course_i into the 
: */
+		jQuery('#tr-course-' + classNum).data({course_i: classNum});
 
 		var class_elem = jQuery('.className' + classNum);
 		class_elem.autocomplete({ source: "auto.php" });
@@ -404,7 +407,7 @@ jQuery(document).ready(function() {
 	//--------------------------------------------------
 	jQuery('.deleteClass').live('click', function() {
 		if(confirm('Delete class and all sections of this class?')) {
-			jQuery('.class'+ jQuery(this).parent().parent().attr("title")).remove();
+		    jQuery('.class' + jQuery(this).parent().parent().data('course_i')).remove();
 		}
 	});
 
@@ -413,7 +416,7 @@ jQuery(document).ready(function() {
 	//--------------------------------------------------
 	jQuery('.deleteSection').live('click', function() {
 	  // Decreases the total number of classes
-	  sectionsOfClass[jQuery(this).parent().parent().attr("title")]--;
+		sectionsOfClass[jQuery(this).parent().parent().data('course_i')]--;
 	  
 	  // Find the ID cell of the row we're in
 	  var row = jQuery(this).parent().parent().find(".sectionIdentifier");
@@ -438,7 +441,8 @@ jQuery(document).ready(function() {
 	// Bind the section-adding method
 	//--------------------------------------------------
 	jQuery('.addSection').live('click', function() {
-		add_section(jQuery(this).parent().parent().attr("title"), sectionsOfClass[jQuery(this).parent().parent().attr("title")]);
+		var course_i = jQuery(this).parent().parent().data('course_i');
+		add_section(course_i, sectionsOfClass[course_i]);
 	});
 
 	//--------------------------------------------------