Update the syntax in InvokeDoc code to avoid runtime Error