Fixed wrong substitiution