Fix invokeWith  method