Fixed function name must be a string error