diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua
index ac022870779f293f5432800e7e3db3dc7d074881..99a9024cc755ba17fa52d3d0831ed869605ae168 100644
--- a/game/modules/tome/class/GameState.lua
+++ b/game/modules/tome/class/GameState.lua
@@ -397,7 +397,7 @@ function _M:generateRandart(data)
 	-- Distribute points
 	local hpoints = math.ceil(points / 2)
 	local i = 0
-	while hpoints > 0 do
+	while hpoints > 0 and #powers >0 do
 		i = util.boundWrap(i + 1, 1, #powers)
 		local p = powers[i]:clone()
 		if p.points <= hpoints then
diff --git a/game/modules/tome/data/timed_effects/physical.lua b/game/modules/tome/data/timed_effects/physical.lua
index 4e7fb397114cc9cf88339f6fadbd5c4f8efaa8ac..f6e189d881a019020d20a3af09c3ca3ef101d5a0 100644
--- a/game/modules/tome/data/timed_effects/physical.lua
+++ b/game/modules/tome/data/timed_effects/physical.lua
@@ -292,7 +292,7 @@ newEffect{
 		local tids = {}
 		for tid, lev in pairs(self.talents) do
 			local t = self:getTalentFromId(tid)
-			if t and not self.talents_cd[tid] and t.mode == "activated" and not t.innate then tids[#tids+1] = t end
+			if t and not self.talents_cd[tid] and t.mode == "activated" and not t.innate and t.no_energy ~= true then tids[#tids+1] = t end
 		end
 		for i = 1, 4 do
 			local t = rng.tableRemove(tids)
@@ -328,7 +328,7 @@ newEffect{
 		local tids = {}
 		for tid, lev in pairs(self.talents) do
 			local t = self:getTalentFromId(tid)
-			if t and not self.talents_cd[tid] and t.mode == "activated" and not t.innate then tids[#tids+1] = t end
+			if t and not self.talents_cd[tid] and t.mode == "activated" and not t.innate and t.no_energy ~= true then tids[#tids+1] = t end
 		end
 		for i = 1, 4 do
 			local t = rng.tableRemove(tids)