Make test_var more robust