diff --git a/ghc/lib/ghc/ArrBase.lhs b/ghc/lib/ghc/ArrBase.lhs
index 0a65a3c59b6adb9dff4f437ec9da54edc034226f..cee229dc7581b0596fac87dfc63990ae8d5bf3e4 100644
--- a/ghc/lib/ghc/ArrBase.lhs
+++ b/ghc/lib/ghc/ArrBase.lhs
@@ -561,7 +561,7 @@ freezeFloatArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) ->
 	  | otherwise
 	    = case (readFloatArray#  from# cur#     s#)  of { StateAndFloat# s1# ele ->
 	      case (writeFloatArray# to#   cur# ele s1#) of { s2# ->
-	      copy (cur# +# 1#) from# to# s1#
+	      copy (cur# +# 1#) from# to# s2#
 	      }}
 
 freezeDoubleArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) ->
@@ -591,7 +591,7 @@ freezeDoubleArray (MutableByteArray ixs arr#) = ST $ \ (S# s#) ->
 	  | otherwise
 	    = case (readDoubleArray#  from# cur#     s#)  of { StateAndDouble# s1# ele ->
 	      case (writeDoubleArray# to#   cur# ele s1#) of { s2# ->
-	      copy (cur# +# 1#) end# from# to# s1#
+	      copy (cur# +# 1#) end# from# to# s2#
 	      }}
 
 unsafeFreezeArray     :: Ix ix => MutableArray s ix elt -> ST s (Array ix elt)