Fixed the invoke method