Fix undefined variable notice from issue #12