check reference error