fixing referecnces