Update dynamic-system.lua to implement the failure fix