fixing refernces