fixed wrong function invocation