fix use of undefined
example script that demonstrates #10