finally fix the parsing bug