Update functions.lua to fix the error in dynamic when an failure occurs