Bugs in parse method fixed