fixed bad database ref