Fix resolve references