patched to solve var issue, but makes comparison moot