fixed the reference problem