fix unset variable
fix tests