Fix 'lost version' bug in workflow handler