#417 Fixed undefined variable error.