bugfix and add parser test
bugfix