Correcting reference error