fix bug in FragmentParser