made more sturdy -- don't want exceptions thrown
Bugfix: accidentally used this instead of actual variable