fixed Parser Logic