Fix Extract task to correctly extract messages with context