Made the fix for the workaround more future proof.