fix memleak in object parser