tweaks for more robustness to vars