diff --git a/gdb-port/parser.py b/gdb-port/parser.py
index 898adba16581e01ed4c30cf8d4241211ea97ec55..f69edddc68f38114461457a928cc09fdf9021c57 100644
--- a/gdb-port/parser.py
+++ b/gdb-port/parser.py
@@ -352,30 +352,30 @@ class ParserStack:
 		# The memory allocated in the "frame" enclosed by current_event and the push event just prior
 		current_frame_alloc = current_event[1] - previous_event[1]
 		print("commit_at_pop: current_frame_alloc", current_frame_alloc) # DEBUG
+		pop_allocs = {}
 
+		# TODO: clean up
 		if len(ev_list) == 1:
 			# Compare bytes allocated in arena to last known value, which will be the additional bytes allocated since reentering the stack frame
 			#alloc_size = self.stack_events[ev_start][1] - current_event[1]
 			current_event[2].add_mem_use(int(self.arena), current_frame_alloc)
 			self.committed = len(self.stack_events)-1
-			print("commit_at_pop: pop_allocs:", { current_event[2].address: current_frame_alloc }) # DEBUG
-			return { current_event[2].address: current_frame_alloc }
-
-		pop_allocs = {}
-		pop_allocs[current_event[2].address] = pop_allocs.get(current_event[2].address, 0) + current_frame_alloc
-
-		if len(ev_list) > 1:
+		#	print("commit_at_pop: pop_allocs:", { current_event[2].address: current_frame_alloc }) # DEBUG
+			pop_allocs[current_event[2].address] = pop_allocs.get(current_event[2].address, 0) + current_frame_alloc
+		#	return { current_event[2].address: current_frame_alloc }
+		elif len(ev_list) > 1:
 			bytes_list = [ev[1] for ev in ev_list]
 
 			differences = map(lambda smaller, bigger: bigger-smaller, bytes_list[:-1], bytes_list[1:])
 			for index, event in enumerate(ev_list[:-1]):
 				alloc = next(differences)
+				assert event != current_event
 				print("commit_at_pop: alloc:", alloc) # DEBUG
 				print("commit_at_pop: adding to parser", event[2].name, hex(event[2].address))
 				event[2].add_mem_use(int(self.arena), alloc)
 				pop_allocs[event[2].address] = pop_allocs.get(event[2].address, 0) + alloc
-			print("commit_at_pop: pop_allocs:", pop_allocs) # DEBUG
 
+		print("commit_at_pop: pop_allocs:", pop_allocs) # DEBUG
 		self.committed = len(self.stack_events)-1
 		return pop_allocs