diff --git a/src/Transaction.jl b/src/Transaction.jl
index fb8a3112ee82ad159ac9432d55b5e9a70ef6af8a..4329081228249ef0f8e2db20143d5a1ad0b34229 100644
--- a/src/Transaction.jl
+++ b/src/Transaction.jl
@@ -444,7 +444,7 @@ result set which is about to be destroyed anyway.
 """
 function _release_result_at(results::Ref{_ResultSet}, index::Cint)
 
-    size = release_result_size(results)
+    size = get_result_size(results)
 
     if index > size
         throw(
@@ -526,7 +526,7 @@ function _release_results(transaction::Ref{_Transaction})
 end
 
 """
-    function _release_results(transaction::Ref{_ResultSet})
+    function _release_results(result_set::Ref{_ResultSet})
 
 Return all entities of the given `result_set`.
 
@@ -534,7 +534,7 @@ This function also leaves the result_set object in a corrupted state and
 should only be used to release the entities from a result_set which is about to
 be destroyed anyway.
 """
-function _release_results(transaction::Ref{_ResultSet})
+function _release_results(result_set::Ref{_ResultSet})
 
     size = get_result_size(result_set)