db reference fix