fixed error in parse method