Fixed references errors