fix inproper closure of function call in .is call