fixed callbacks for parser.parse()