diff --git a/game/modules/tome/dialogs/DeathDialog.lua b/game/modules/tome/dialogs/DeathDialog.lua
index 9267a8dbc5aff057c51f1eaba5fb9f2a13a348ea..6d1a7030b734e4701307ba7df4126737e892ed7f 100644
--- a/game/modules/tome/dialogs/DeathDialog.lua
+++ b/game/modules/tome/dialogs/DeathDialog.lua
@@ -40,11 +40,10 @@ function _M:init(actor)
 		ACCEPT = function() self:use() end,
 	})
 	self:mouseZones{
-		{ x=2, y=45, w=350, h=self.font_h*self.max, fct=function(button, x, y, xrel, yrel, tx, ty)
+		{ x=2, y=10 + self.font:lineSkip()*6, w=350, h=self.font_h*self.max, fct=function(button, x, y, xrel, yrel, tx, ty)
 			self.changed = true
 			self.sel = util.bound(self.scroll + math.floor(ty / self.font_h), 1, #self.list)
-			if button == "left" then self:learn(true)
-			elseif button == "right" then self:learn(false)
+			if button == "left" then self:use()
 			end
 			self.changed = true
 		end },
@@ -57,6 +56,7 @@ function _M:cleanActor()
 
 	-- Go through all spell effects
 	for eff_id, p in pairs(self.actor.tmp) do
+
 		local e = self.actor.tempeffect_def[eff_id]
 		effs[#effs+1] = {"effect", eff_id}
 	end
diff --git a/src/music.c b/src/music.c
index 5e1a30a9455c7c8b7f068550e789e90560045e4b..9235da77725a1f5f777d541d6da68af300153e90 100644
--- a/src/music.c
+++ b/src/music.c
@@ -42,6 +42,7 @@ static int music_new(lua_State *L)
 	SDL_RWops *rops = PHYSFSRWOPS_openRead(name);
 	if (!rops)
 	{
+		*m = NULL;
 		return 0;
 	}
 	*m = Mix_LoadMUS_RW(rops);
@@ -53,7 +54,7 @@ static int music_new(lua_State *L)
 static int music_free(lua_State *L)
 {
 	Mix_Music **m = (Mix_Music**)auxiliar_checkclass(L, "core{music}", 1);
-	Mix_FreeMusic(*m);
+	if (*m) Mix_FreeMusic(*m);
 	lua_pushnumber(L, 1);
 	return 1;
 }
@@ -98,6 +99,7 @@ static int sound_new(lua_State *L)
 	SDL_RWops *rops = PHYSFSRWOPS_openRead(name);
 	if (!rops)
 	{
+		*m = NULL;
 		return 0;
 	}
 	*m = Mix_LoadWAV_RW(rops, 1);
@@ -110,7 +112,7 @@ static int sound_new(lua_State *L)
 static int sound_free(lua_State *L)
 {
 	Mix_Chunk **m = (Mix_Chunk**)auxiliar_checkclass(L, "core{sound}", 1);
-	Mix_FreeChunk(*m);
+	if (*m) Mix_FreeChunk(*m);
 	lua_pushnumber(L, 1);
 	return 1;
 }