added null terminators to parser