Added plug function to handle plugging contexts.