fixes function invocation