Fixed references bug.