 		else
 			skill_html += "<tr><td style='vertical-align: top;'><a id='skill_#{skill._id}' class='fake_link' onclick='show_item_detail(skills, \"#{skill._id}\")'>#{skill.name}</a></td><td style='vertical-align: top;'><input id='skill_#{skill._id}_input' class='two_digit' value='' onblur='recalc_edit_page()'></td><td style='font-size: xx-small; vertical-align: top;'>#{skill.ability}<br><span id='#{skill._id}_mods' style='font-size: xx-small;'></span></td></tr>"
 	
-	$("#skills_table").append skill_html.join("")
+	$("#skills_table").append skill_html
 	skills.get(subtypes: "!is": null).forEach (skill, i) ->
 		$("#" + skill.name).hide()
 	

	skill_link = $("a[id='skill_#{skill._id}']#{if subtype then "[subtype='#{subtype}']" else ""}")
	skill_link.attr "style", "font-weight: bold;"	if skill_link and class_skill

edit.update_race_mods = ->
	race = races.first(name: $("#race").val())
	if race
		for ability of abilities
			mod = (if not race.abilities[ability]? then " " else race.abilities[ability])
			$("#race_#{ability}_mod").text pos(mod)

edit.update_language = (language_id) ->
	checked = $("#language_#{language_id}_check").attr("checked")
	language = languages.first(_id: language_id)
	char_lang_idx = chardata.languages.indexOf(language.name)
	if not checked and char_lang_idx > -1
		remove chardata.languages, char_lang_idx
	else
		chardata.languages.push language.name

		level = (if $("#xp").val() == "" then 0 else parseInt($("#xp").val()))
		show_class_dialog calc_level(level) + 1, 0

create_languages =  ->
	language_html = ""
	for i, lang of languages.get()
		language_html += "<tr id='language_#{lang._id}'><td><input id='language_#{lang._id}_check' onclick='update_language(\"#{lang._id}\"); recalc_edit_page();' type='checkbox'/></td><td><label for='language_#{lang._id}_check'>#{lang.name}</label></td>"
	language_html

populate_edit_page =  ->
	$("#charname").val chardata.name	if chardata.name
	race_name = chardata.race_name or $("#race").val()
	race = races.first(name: race_name)
