Fixed two parsing bugs detected by looking at graphs