Fix undefined variable in parser

Let me know if this isn't the intended behavior, or if you want tests or something