references bug fixed