fixed the fatal error occurring if the ['function'] variable is a Closure