Fix issue with 'when' field not being found.