Fixed bug in reference parsing

There can be * in labels, so we should parse these.