fixed support for references