pf.parseDescriptor incorrectly loops starting from length + 1

Not necessary a bug that causes any problem, but it did look odd when I was debugging through the code.

fixed incorrect looping from length + 1 to length in parse descriptor
and removed unnecessary undefined check