fix referance definitions.