fixed a bug in ParsePtr