diff --git a/src/variables.jl b/src/variables.jl
index d5ddbe23fa13acad19fad0882301145c513431ee..297b161d0219138e8a8256724bce54e5fb6a03ab 100644
--- a/src/variables.jl
+++ b/src/variables.jl
@@ -23,9 +23,9 @@ Parent type of all components, building block, and sequences that form an MRI se
 """
 abstract type AbstractBlock end
 
-function fixed(ab::AbstractBlock)
+function fixed(ab::T) where {T<:AbstractBlock}
     params = []
-    for prop_name in propertynames(ab)
+    for prop_name in fieldnames(T)
         push!(params, fixed(getproperty(ab, prop_name)))
     end
     return typeof(ab)(params...)