fixed upvalue passing