Fixed parser function scoping