Fix internal refrences