Fixed handling of exceptions when calling actions.