Fixes broken refs