fix bug in parsing (#1061)