Updated parse method with lsmith's code. Fix #2533149