fixed unbound variable